package com.netease.imageex;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewConfiguration;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.netease.framework.ActivityEx;
import com.netease.image.video.ag;
import com.netease.image.video.ak;
import com.netease.pris.a.h;
import com.netease.pris.activity.ArticleGalleryActivity;
import com.netease.pris.activity.PRISActivityForward;
import com.netease.pris.activity.view.ImageFlingGallery;
import com.netease.pris.activity.view.PrisImageView;
import com.netease.pris.activity.view.ao;
import com.netease.pris.activity.view.ap;
import com.netease.pris.activity.view.bh;
import com.netease.pris.activity.view.ca;
import com.netease.pris.activity.view.q;
import com.netease.pris.activity.view.r;
import com.netease.pris.activity.view.s;
import com.netease.pris.app.PrisApp;
import com.netease.pris.atom.z;
import com.netease.pris.v;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class ImageViewScanActivity extends ActivityEx
  implements View.OnClickListener, ao, ap, ca, com.netease.pris.activity.view.i, q, r, s
{
  public static final int a = 100;
  private static final int ab = 1;
  private static final int ac = 5;
  private static final int ad = 6;
  private static final int ae = 7;
  private static final long af = 3000L;
  public static final int b = 101;
  public static final int c = 102;
  public static final int d = 105;
  public static final int e = 106;
  public static int f = 0;
  public static int g = 0;
  public static final String i = "extra_path";
  public static final String j = "extra_text";
  public static final String k = "extra_position";
  public static final String l = "extra_index";
  public static final String m = "extra_local";
  public static final String n = "extra_type";
  public static final String o = "action_test";
  public static final String p = "action_ealbum";
  private ImageView A;
  private ImageView B;
  private ProgressBar C;
  private TextView D;
  private i E;
  private int F;
  private int G;
  private int H;
  private int I;
  private String J;
  private String K;
  private String L;
  private Context M;
  private com.netease.pris.protocol.d N;
  private com.netease.pris.protocol.d O = null;
  private LinkedList P;
  private boolean Q = true;
  private boolean R = false;
  private boolean S = true;
  private boolean T = false;
  private boolean U = false;
  private final int V = 2130837714;
  private final int W = 2130837716;
  private Animation X = null;
  private Animation Y = null;
  private Animation.AnimationListener Z = null;
  private boolean aa = false;
  private Handler ag = new b(this);
  private Runnable ah = new c(this);
  private Runnable ai = new e(this);
  public ImageFlingGallery h;
  public int q;
  public int r;
  boolean s = false;
  com.netease.pris.b t = new d(this);
  private View u;
  private View v;
  private ImageView w;
  private ImageView x;
  private ImageView y;
  private ImageView z;

  private void A()
  {
    if (this.u.getVisibility() == 0)
    {
      this.u.startAnimation(this.Y);
      this.u.setVisibility(4);
    }
    if (this.v.getVisibility() == 0)
    {
      this.v.startAnimation(this.Y);
      this.v.setVisibility(4);
    }
  }

  private void a(int paramInt1, int paramInt2)
  {
    if (this.O.h.get(paramInt1) != null)
    {
      this.T = true;
      a(900, this.O.h.get(paramInt1), null, null);
      this.F = paramInt2;
    }
  }

  private void a(int paramInt, Object paramObject, String paramString1, String paramString2)
  {
    switch (paramInt)
    {
    default:
      return;
    case 903:
      this.G = v.a().c(paramString1, com.netease.pris.atom.b.a);
    case 900:
    case 800:
    case 801:
    case 502:
    case 501:
    }
    while (true)
    {
      this.P.add(new Integer(this.G));
      break;
      this.G = v.a().a((com.netease.pris.atom.u)paramObject, 260, this.q, false);
      continue;
      this.G = v.a().a(paramString1, paramString2);
      continue;
      this.G = v.a().a((String)paramObject, paramString1, paramString2);
      continue;
      this.G = v.a().e((com.netease.pris.atom.u)paramObject);
      continue;
      this.G = v.a().d((com.netease.pris.atom.u)paramObject);
    }
  }

  public static void a(Context paramContext, String paramString1, String paramString2, int paramInt1, int paramInt2, int paramInt3)
  {
    Intent localIntent = new Intent(paramContext, ImageViewScanActivity.class);
    localIntent.addFlags(67108864);
    localIntent.setAction("action_ealbum");
    localIntent.putExtra("extra_path", paramString1);
    localIntent.putExtra("extra_text", paramString2);
    localIntent.putExtra("extra_index", paramInt1);
    localIntent.putExtra("extra_position", paramInt2);
    localIntent.putExtra("extra_type", paramInt3);
    ((Activity)paramContext).startActivityForResult(localIntent, 4096);
  }

  public static void a(Context paramContext, String paramString1, String paramString2, int paramInt1, boolean paramBoolean, int paramInt2, int paramInt3)
  {
    Intent localIntent = new Intent(paramContext, ImageViewScanActivity.class);
    localIntent.addFlags(67108864);
    localIntent.putExtra("extra_path", paramString1);
    localIntent.putExtra("extra_text", paramString2);
    localIntent.putExtra("extra_position", paramInt2);
    localIntent.putExtra("extra_index", paramInt1);
    localIntent.putExtra("extra_local", paramBoolean);
    localIntent.putExtra("extra_type", paramInt3);
    paramContext.startActivity(localIntent);
  }

  public static void a(Context paramContext, ArrayList paramArrayList1, ArrayList paramArrayList2, String paramString, int paramInt1, int paramInt2, int paramInt3)
  {
    Intent localIntent = new Intent(paramContext, ImageViewScanActivity.class);
    localIntent.addFlags(67108864);
    localIntent.setAction("action_test");
    localIntent.putStringArrayListExtra("extra_path", paramArrayList1);
    localIntent.putStringArrayListExtra("extra_text", paramArrayList2);
    localIntent.putExtra("extra_local", paramString);
    localIntent.putExtra("extra_position", paramInt2);
    localIntent.putExtra("extra_index", paramInt1);
    localIntent.putExtra("extra_type", paramInt3);
    paramContext.startActivity(localIntent);
  }

  private void a(com.netease.pris.atom.u paramu, int paramInt)
  {
    int i1 = 0;
    if (paramu == null);
    ArrayList localArrayList1;
    ArrayList localArrayList2;
    while (true)
    {
      return;
      if (!paramu.K())
        break;
      localArrayList1 = new ArrayList();
      localArrayList2 = new ArrayList();
      z[] arrayOfz = paramu.aA();
      if (arrayOfz == null)
        continue;
      for (int i2 = 0; i2 < arrayOfz.length; i2++)
      {
        if (localArrayList1.contains(Uri.parse(arrayOfz[i2].g())))
          continue;
        localArrayList1.add(Uri.parse(arrayOfz[i2].g()));
        localArrayList2.add(arrayOfz[i2].v());
      }
      this.r = com.netease.b.a.d.f();
      if (paramInt >= 0)
        break label169;
      if (!this.S)
        break label155;
    }
    while (true)
    {
      b(localArrayList1, localArrayList2, i1, true);
      i(this.I);
      break;
      break;
      label155: i1 = -1 + localArrayList1.size();
      continue;
      label169: i1 = paramInt;
    }
  }

  private void a(com.netease.pris.protocol.d paramd)
  {
    if ((paramd == null) || (paramd.h == null));
    while (true)
    {
      return;
      if ((this.O != null) && (this.O.h != null))
      {
        com.netease.pris.a.i.a(paramd.h, this.O.h);
        this.O.h.addAll(paramd.h);
      }
      a(this.I, -1);
    }
  }

  private void a(List paramList1, List paramList2, int paramInt, boolean paramBoolean)
  {
    if ((paramList1 == null) || (paramList2 == null))
      return;
    if (paramList1.size() <= 1);
    for (boolean bool = false; ; bool = true)
    {
      this.s = bool;
      this.E = new i(this, new ak(paramList1, paramList2, paramBoolean), this.r);
      this.h.a(this.E, paramInt);
      b(paramInt);
      this.C.setVisibility(8);
      this.h.b(true);
      this.h.a(this);
      this.C.setVisibility(8);
      z();
      break;
    }
  }

  private void b(List paramList1, List paramList2, int paramInt, boolean paramBoolean)
  {
    if ((paramList1 == null) || (paramList2 == null))
      return;
    if (paramList1.size() <= 1);
    for (boolean bool = false; ; bool = true)
    {
      this.s = bool;
      this.E = new i(this, new ak(paramList1, paramList2, paramBoolean), this.r);
      this.h.a(this.E, paramInt);
      b(paramInt);
      this.h.b(true);
      this.h.a(this);
      this.C.setVisibility(8);
      break;
    }
  }

  private void b(boolean paramBoolean)
  {
    if (paramBoolean)
      z();
    while (true)
    {
      return;
      A();
    }
  }

  private void c(boolean paramBoolean)
  {
    if (paramBoolean);
    for (int i1 = 2131362166; ; i1 = 2131362167)
    {
      com.netease.l.b.b.a(this.M, i1, 49, 54.0F);
      return;
    }
  }

  private void i(int paramInt)
  {
    if (this.H != 512);
    while (true)
    {
      return;
      if ((this.O != null) && (this.O.h != null) && (this.O.h.size() > 0) && (paramInt >= 0) && (paramInt < this.O.h.size()) && (this.O.h.get(paramInt) != null))
      {
        com.netease.l.b.b.a(this.M, ((com.netease.pris.atom.u)this.O.h.get(paramInt)).U(), 2130903041, 49, 54.0F);
        continue;
      }
    }
  }

  private void r()
  {
    if (this.ag != null)
    {
      this.ag.removeMessages(5);
      this.ag.removeMessages(6);
      this.ag.removeMessages(7);
      this.ag.removeCallbacks(this.ah);
      this.ag.removeCallbacks(this.ai);
      this.ag = null;
    }
  }

  private void s()
  {
    if (this.E != null)
    {
      this.E.a();
      this.E = null;
    }
    if (this.C.isShown())
    {
      this.C.setVisibility(8);
      this.C = null;
    }
    if (this.N != null)
    {
      this.N.k();
      this.N = null;
    }
    if (this.J != null)
      this.J = null;
    if (this.K != null)
      this.K = null;
    if (this.Y != null)
      this.Y = null;
    if (this.X != null)
      this.X = null;
    if (this.N != null)
      this.N = null;
    if (this.O != null)
      this.O = null;
  }

  private void t()
  {
    PrisImageView localPrisImageView = this.h.c();
    if (localPrisImageView == null);
    while (true)
    {
      return;
      Bitmap localBitmap = localPrisImageView.g();
      if (localBitmap == null)
        continue;
      try
      {
        setWallpaper(localBitmap);
      }
      catch (IOException localIOException)
      {
        localIOException.printStackTrace();
      }
    }
  }

  private void u()
  {
    Intent localIntent;
    PrisImageView localPrisImageView;
    com.netease.image.video.a locala;
    try
    {
      localIntent = new Intent();
      localIntent.setAction("android.intent.action.SEND");
      localPrisImageView = this.h.c();
      if (localPrisImageView == null)
        return;
      locala = localPrisImageView.f();
      if ((locala == null) || (!(locala instanceof com.netease.image.video.a)))
        h.a(this, 2131362160);
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    Uri localUri = locala.b();
    Bitmap localBitmap = localPrisImageView.g();
    if (localBitmap == null)
    {
      h.a(this, 2131362160);
    }
    else
    {
      String str = PrisApp.a().i() + System.currentTimeMillis() + ".jpg";
      if (!com.netease.image.c.a(localBitmap, str, Bitmap.CompressFormat.JPEG))
      {
        h.a(this, 2131362160);
      }
      else
      {
        localIntent.setType("image/jpg");
        localIntent.putExtra("android.intent.extra.SUBJECT", localUri.getLastPathSegment());
        localIntent.putExtra("android.intent.extra.STREAM", Uri.fromFile(new File(str)));
        startActivity(localIntent);
      }
    }
  }

  private void v()
  {
    PrisImageView localPrisImageView = this.h.c();
    if (localPrisImageView == null);
    while (true)
    {
      return;
      Bitmap localBitmap = localPrisImageView.g();
      if (localBitmap == null)
      {
        h.a(this, 2131362161);
        continue;
      }
      String str = PrisApp.a().i() + System.currentTimeMillis() + ".jpg";
      if (com.netease.image.c.a(localBitmap, str, Bitmap.CompressFormat.JPEG))
      {
        Object[] arrayOfObject = new Object[1];
        arrayOfObject[0] = str;
        h.a(this, getString(2131362162, arrayOfObject));
        continue;
      }
      h.a(this, 2131362163);
    }
  }

  private String w()
  {
    String str = "";
    if ((this.O != null) && (this.O.h != null) && (this.O.h.size() > 0) && (this.I >= 0) && (this.I < this.O.h.size()))
      str = ((com.netease.pris.atom.u)this.O.h.get(this.I)).U();
    return str;
  }

  private void x()
  {
    PrisImageView localPrisImageView = this.h.c();
    if (localPrisImageView == null);
    while (true)
    {
      return;
      com.netease.image.video.a locala = localPrisImageView.f();
      if ((locala == null) || (!(locala instanceof com.netease.image.video.a)))
      {
        h.a(this, 2131362164);
        continue;
      }
      if ((locala instanceof ag))
      {
        PRISActivityForward.a(this, w(), ((ag)locala).i().toString(), "大图");
        continue;
      }
      h.a(this, 2131362165);
    }
  }

  private void y()
  {
    this.Q = com.netease.pris.a.u.c();
    this.u = findViewById(2131558544);
    this.C = ((ProgressBar)findViewById(2131558543));
    this.C.setVisibility(0);
    this.v = findViewById(2131558540);
    this.x = ((ImageView)findViewById(2131558545));
    this.w = ((ImageView)findViewById(2131558547));
    this.y = ((ImageView)findViewById(2131558546));
    this.y.setImageResource(2130837716);
    this.y.setTag(Integer.valueOf(2130837716));
    this.R = false;
    this.D = ((TextView)findViewById(2131558542));
    this.Z = new f(this);
    this.Y = new AlphaAnimation(1.0F, 0.0F);
    this.Y.setDuration(f);
    this.Y.setAnimationListener(this.Z);
    this.X = new AlphaAnimation(0.0F, 1.0F);
    this.X.setDuration(f);
    this.X.setAnimationListener(this.Z);
    com.netease.g.b.c("ImageViewScanAction", "mSupportMp is: " + this.Q);
    if (this.Q)
    {
      this.w.setVisibility(4);
      this.x.setVisibility(4);
    }
    while (true)
    {
      this.y.setOnClickListener(this);
      this.z = ((ImageView)findViewById(2131558541));
      this.z.setOnClickListener(this);
      this.A = ((ImageView)findViewById(2131558437));
      this.A.setOnClickListener(this);
      this.B = ((ImageView)findViewById(2131558548));
      this.B.setOnClickListener(this);
      this.w.setEnabled(false);
      this.x.setEnabled(false);
      return;
      this.w.setVisibility(0);
      this.x.setVisibility(0);
      this.x.setOnClickListener(this);
      this.w.setOnClickListener(this);
    }
  }

  private void z()
  {
    if (this.u.getWindowToken() == null)
      this.ag.post(new a(this));
    while (true)
    {
      return;
      h();
      if (this.u.getVisibility() != 0)
      {
        this.u.startAnimation(this.X);
        this.u.setVisibility(0);
      }
      if (this.v.getVisibility() == 0)
        continue;
      this.v.startAnimation(this.X);
      this.v.setVisibility(0);
    }
  }

  public void a()
  {
    this.S = false;
    if (this.T);
    while (true)
    {
      return;
      if (this.H != 512)
      {
        com.netease.l.b.b.a(this.M, 2131361938);
        continue;
      }
      int i1 = -1 + this.I;
      if ((this.O == null) || (this.O.h == null) || (this.O.h.size() <= 0))
        continue;
      if (i1 < 0)
      {
        com.netease.l.b.b.a(this.M, 2131361938);
        continue;
      }
      a(i1, -1);
      c(true);
      this.I = (-1 + this.I);
    }
  }

  public void a(int paramInt)
  {
    b(paramInt);
    com.netease.pris.d.c.a(p(), 738);
  }

  public void a(int paramInt1, int paramInt2, Object paramObject)
  {
    switch (paramInt2)
    {
    default:
    case 102:
    case 106:
    }
    while (true)
    {
      return;
      h();
      continue;
      if ((paramObject == null) || (!(paramObject instanceof bh)))
        continue;
      bh localbh = (bh)paramObject;
      localbh.b(f());
      localbh.a(e());
    }
  }

  void a(int paramInt, boolean paramBoolean, Object paramObject)
  {
    Message localMessage = Message.obtain();
    localMessage.what = paramInt;
    localMessage.obj = paramObject;
    if (paramBoolean)
      this.ag.sendMessageDelayed(localMessage, 3000L);
    while (true)
    {
      return;
      this.ag.sendMessage(localMessage);
    }
  }

  public void a(MotionEvent paramMotionEvent)
  {
    if (this.ag == null);
    while (true)
    {
      return;
      this.ag.removeCallbacks(this.ah);
      this.ag.removeCallbacks(this.ai);
      this.ag.postDelayed(this.ai, ViewConfiguration.getLongPressTimeout());
    }
  }

  public void a(View paramView)
  {
    this.h.b();
  }

  public boolean a(MotionEvent paramMotionEvent1, MotionEvent paramMotionEvent2, float paramFloat1, float paramFloat2)
  {
    PrisImageView localPrisImageView = this.h.c();
    if ((localPrisImageView != null) && (localPrisImageView.i() > 1.0F))
      localPrisImageView.a(-paramFloat1, -paramFloat2);
    for (int i1 = 1; ; i1 = 0)
      return i1;
  }

  public void b()
  {
    this.S = true;
    if ((this.T) || (this.U));
    while (true)
    {
      return;
      if (this.H != 512)
      {
        com.netease.l.b.b.a(this.M, 2131361939);
        continue;
      }
      int i1 = 1 + this.I;
      if ((this.O == null) || (this.O.h == null) || (this.O.h.size() <= 0) || (i1 < 0))
        continue;
      if (i1 >= this.O.h.size())
      {
        if (this.U)
          continue;
        if (this.J != null)
        {
          this.U = true;
          a(903, null, this.J, null);
          c(false);
          continue;
        }
        com.netease.l.b.b.a(this.M, 2131361939);
        continue;
      }
      a(i1, -1);
      c(false);
      this.I = (1 + this.I);
    }
  }

  public void b(int paramInt)
  {
    h();
    if (this.E == null)
      return;
    if (TextUtils.isEmpty(((com.netease.image.video.a)this.E.getItem(paramInt)).g()))
      this.y.setVisibility(4);
    while (true)
    {
      String str = paramInt + 1 + "/" + this.E.getCount();
      if (str != null)
        this.D.setText(str);
      if (str == null)
        break;
      this.D.setText(str);
      break;
      this.y.setVisibility(0);
    }
  }

  public void b(View paramView)
  {
    this.h.a();
  }

  public void c(View paramView)
  {
    PrisImageView localPrisImageView = this.h.c();
    if (localPrisImageView != null)
      localPrisImageView.e();
    h();
  }

  public boolean c()
  {
    if (this.ag == null);
    PrisImageView localPrisImageView;
    do
    {
      return false;
      this.ag.removeCallbacks(this.ai);
      this.ag.removeCallbacks(this.ah);
      this.aa = false;
      localPrisImageView = this.h.c();
    }
    while (localPrisImageView == null);
    if (localPrisImageView.i() == 1.0F)
      localPrisImageView.a(2.0F);
    while (true)
    {
      h();
      break;
      localPrisImageView.a(1.0F);
    }
  }

  public void d(View paramView)
  {
    PrisImageView localPrisImageView = this.h.c();
    if (localPrisImageView != null)
      localPrisImageView.d();
    h();
  }

  public boolean d()
  {
    boolean bool = true;
    if (this.ag == null)
      bool = false;
    while (true)
    {
      return bool;
      this.ag.removeCallbacks(this.ai);
      this.ag.removeCallbacks(this.ah);
      this.ag.postDelayed(this.ah, ViewConfiguration.getDoubleTapTimeout());
      this.aa = bool;
    }
  }

  public boolean e()
  {
    return this.R;
  }

  public boolean f()
  {
    if (this.u.getVisibility() == 0);
    for (int i1 = 1; ; i1 = 0)
      return i1;
  }

  public void finish()
  {
    Intent localIntent = new Intent();
    Bundle localBundle = new Bundle();
    localBundle.putInt("position", this.I);
    localBundle.putString("nexturl", this.K);
    localIntent.putExtras(localBundle);
    setResult(-1, localIntent);
    super.finish();
  }

  public void g()
  {
    boolean bool1 = true;
    if (this.aa)
    {
      Log.v("ImageViewScanAcitivity", "onClickShowText return ######################");
      return;
    }
    int i1;
    label40: int i2;
    label47: boolean bool2;
    if (((Integer)this.y.getTag()).intValue() == 2130837714)
    {
      i1 = bool1;
      if (i1 == 0)
        break label103;
      i2 = 2130837716;
      this.y.setImageResource(i2);
      this.y.setTag(Integer.valueOf(i2));
      ImageFlingGallery localImageFlingGallery = this.h;
      if (i1 != 0)
        break label109;
      bool2 = bool1;
      label79: localImageFlingGallery.a(bool2);
      if (i1 != 0)
        break label115;
    }
    while (true)
    {
      this.R = bool1;
      break;
      i1 = 0;
      break label40;
      label103: i2 = 2130837714;
      break label47;
      label109: bool2 = false;
      break label79;
      label115: bool1 = false;
    }
  }

  public void h()
  {
    PrisImageView localPrisImageView = this.h.c();
    if (localPrisImageView != null)
    {
      this.w.setEnabled(localPrisImageView.b());
      this.x.setEnabled(localPrisImageView.c());
    }
  }

  public void onClick(View paramView)
  {
    switch (paramView.getId())
    {
    default:
    case 2131558541:
    case 2131558437:
    case 2131558548:
    case 2131558545:
    case 2131558547:
    case 2131558546:
    }
    while (true)
    {
      return;
      ArticleGalleryActivity.a(this.M, this.J, this.L, this.I, 0);
      continue;
      v();
      com.netease.pris.d.c.a(p(), 1760);
      continue;
      x();
      com.netease.pris.d.c.a(p(), 737);
      continue;
      d(paramView);
      continue;
      c(paramView);
      continue;
      g();
    }
  }

  public void onCreate(Bundle paramBundle)
  {
    int i1 = 0;
    a(false);
    super.onCreate(paramBundle);
    setDefaultKeyMode(2);
    getWindow().setFlags(1024, 1024);
    requestWindowFeature(1);
    setContentView(2130903083);
    ((FrameLayout)findViewById(16908290)).setBackgroundColor(-16777216);
    this.h = ((ImageFlingGallery)findViewById(2131558539));
    y();
    this.h.a(this);
    this.h.a(this);
    this.h.a(this);
    this.h.a(this);
    this.h.a(this);
    this.h.a(this);
    this.h.a(this);
    int i2 = com.netease.image.c.a(this, 24.0F);
    this.h.a(i2);
    ArrayList localArrayList1 = new ArrayList();
    ArrayList localArrayList2 = new ArrayList();
    this.M = this;
    this.P = new LinkedList();
    v.a().a(this.t);
    this.H = 256;
    if ("action_test".equals(getIntent().getAction()))
    {
      ArrayList localArrayList3 = getIntent().getStringArrayListExtra("extra_path");
      ArrayList localArrayList4 = getIntent().getStringArrayListExtra("extra_text");
      this.L = getIntent().getStringExtra("extra_local");
      int i7 = getIntent().getIntExtra("extra_index", 0);
      this.I = getIntent().getIntExtra("extra_position", 0);
      this.H = getIntent().getIntExtra("extra_type", 256);
      int i8 = localArrayList3.size();
      while (i1 < i8)
      {
        localArrayList1.add(Uri.parse((String)localArrayList3.get(i1)));
        localArrayList2.add(localArrayList4.get(i1));
        i1++;
      }
      a(localArrayList1, localArrayList2, i7, true);
      switch (this.H)
      {
      default:
      case 256:
      case 512:
      case 1024:
      case 2048:
      }
    }
    while (true)
    {
      return;
      if ("action_ealbum".equals(getIntent().getAction()))
      {
        this.L = getIntent().getStringExtra("extra_text");
        int i6 = getIntent().getIntExtra("extra_index", 0);
        this.I = getIntent().getIntExtra("extra_position", 0);
        this.J = getIntent().getStringExtra("extra_path");
        this.K = this.J;
        this.H = getIntent().getIntExtra("extra_type", 256);
        this.q = com.netease.b.a.d.f();
        this.O = PrisApp.a().p();
        a(this.I, i6);
        break;
      }
      this.I = getIntent().getIntExtra("extra_position", 0);
      int i3 = getIntent().getIntExtra("extra_index", 0);
      this.H = getIntent().getIntExtra("extra_type", 256);
      if (!getIntent().getBooleanExtra("extra_local", false))
      {
        File localFile = new File(getIntent().getStringExtra("extra_path"));
        if (localFile.isDirectory())
        {
          File[] arrayOfFile = localFile.listFiles();
          if ((arrayOfFile == null) || (arrayOfFile.length <= 0))
          {
            h.a(this, 2131362154);
            finish();
          }
          int i4 = arrayOfFile.length;
          for (int i5 = 0; i5 < i4; i5++)
          {
            localArrayList1.add(Uri.fromFile(arrayOfFile[i5]));
            localArrayList2.add("");
          }
        }
        localArrayList1.add(Uri.fromFile(localFile));
        localArrayList2.add("");
      }
      for (boolean bool = false; ; bool = true)
      {
        a(localArrayList1, localArrayList2, i3, bool);
        break;
        localArrayList1.add(Uri.parse(getIntent().getStringExtra("extra_path")));
        localArrayList2.add(getIntent().getStringExtra("extra_text"));
      }
      this.z.setVisibility(8);
    }
  }

  protected Dialog onCreateDialog(int paramInt)
  {
    Object localObject;
    switch (paramInt)
    {
    default:
      localObject = super.onCreateDialog(paramInt);
    case 1:
    }
    while (true)
    {
      return localObject;
      String[] arrayOfString = getResources().getStringArray(2131165203);
      localObject = new AlertDialog.Builder(this).setItems(arrayOfString, new g(this)).create();
      ((AlertDialog)localObject).setTitle(2131362159);
    }
  }

  protected void onDestroy()
  {
    v.a().b(this.t);
    if (this.t != null)
    {
      this.t.c();
      this.t = null;
    }
    if (this.P != null)
      this.P.clear();
    v.a().a(this.q);
    com.netease.image.d.a().a(this.r);
    r();
    s();
    com.netease.l.b.b.a();
    super.onDestroy();
    System.gc();
  }

  protected void onResume()
  {
    super.onResume();
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.imageex.ImageViewScanActivity
 * JD-Core Version:    0.6.0
 */